﻿<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>DependencyPropertySnippet</Title>
      <Author>Karmelo</Author>
      <Description>Add a private memeber and corresponding dependency property</Description>
      <Shortcut>dpp</Shortcut>
    </Header>
    <Snippet>
      <Code Language="CSharp">
        <![CDATA[private $MemberType$ _$MemberName$;
                 public $MemberType$ $MemberName$
                 {
                    get => _$MemberName$;
                    set
                    {
                      if(_$MemberName$ != value)
                      {
                        _$MemberName$ = value;
                        OnPropertyChanged(nameof($MemberName$));
                      }
                    }
                 }]]>
      </Code>
      <Declarations>
        <Literal>
          <ID>MemberName</ID>
          <ToolTip>the name of the member variable</ToolTip>
          <Default>varname</Default>
        </Literal>
        <Literal>
          <ID>MemberType</ID>
          <ToolTip>the type of the member variable</ToolTip>
          <Default>typename</Default>
        </Literal>
      </Declarations>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
